//useParams可以获取动态路由参数

import { useParams } from 'react-router-dom'

let Friend = () => {

    let params = useParams<{ name: string, id: string }>()

    console.log(params)

    return (
        <fieldset>
            <legend>Friend</legend>
            <h1>Friend</h1>
            <h1>params:{params.name}</h1>
        </fieldset>
    )
}

export default Friend